/* eslint-disable @typescript-eslint/no-explicit-any */
import { createRequest } from '../config/axios.config';

/**
 * 手机号登录
 */
export const PhoneLoginPost = createRequest<any, any>('PhoneLoginPost', ({ requestBody }) => ({
    url: `/pisces/clinic/login/phone_login`,
    method: 'POST',
    data: requestBody,
    headers: { 'Content-Type': 'application/json' },
}));

/**
 * 获取用户信息
 */
export const DoctorInfoGet = createRequest<any, any>('DoctorInfoGet', () => ({
    url: `/pisces/clinic/get_doctor_info`,
    method: 'GET',
}));

/**
 * 创建病历
 */
export const CreateMedicalRecordPost = createRequest<any, any>(
    'CreateMedicalRecordPost',
    ({ requestBody }) => ({
        url: `/pisces/clinic/create_medical_record`,
        method: 'POST',
        data: requestBody,
        headers: { 'Content-Type': 'application/json' },
    }),
);

/**
 * 通知开始/结束录音
 */
export const AdjustVoiceStatusPost = createRequest<any, any>(
    'AdjustVoiceStatusPost',
    ({ requestBody }) => ({
        url: '/pisces/clinic/adjust_voice_status',
        method: 'POST',
        data: requestBody,
        headers: { 'Content-Type': 'application/json' },
    }),
);

/**
 * 录音过程中获取患者ID
 */
export const VoicePatientGet = createRequest<any, any>('VoicePatientGet', () => ({
    url: '/pisces/clinic/voice_patient',
    method: 'GET',
}));



/**
 * 语音转录文字
 */
export const VoiceToTextPost = createRequest<any, any>(
    'AdjustVoiceStatusPost',
    ({ requestBody }) => ({
        url: '/pisces/clinic/voice2text',
        method: 'POST',
        data: requestBody,
        headers: { 'Content-Type': 'application/json' },
    }),
);